﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="EditFlightSchedule.aspx.cs" Inherits="Xyz.Web.Admin.Flight.EditFlightSchedule" %>
<%@ Register Src="~/Flight/TimePicker/TimePickerControl.ascx"  TagPrefix="tp" TagName="TimePicker"%>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Flight Schedule</h2>
<script type="text/javascript" language="javascript">
    $(function () {
        $("#" + "<%= txtDepartDate.ClientID %>").datepicker({
            dateFormat: 'dd-M-yy',
            changeMonth: true,
            changeYear: true,
            showButtonPanel: false,
            closeText: 'Close',
            showOn: 'both',
            buttonImage: '/Images/calendar.gif',
            buttonImageOnly: true
        });

        $("#" + "<%= txtArrivalDate.ClientID %>").datepicker({
            dateFormat: 'dd-M-yy',
            changeMonth: true,
            changeYear: true,
            showButtonPanel: false,
            closeText: 'Close',
            showOn: 'both',
            buttonImage: '/Images/calendar.gif',
            buttonImageOnly: true
        });

        $('img.ui-datepicker-trigger').css({ margin: '0px 0px -5px -18px' });
    });

</script>

<asp:ValidationSummary ID="FlightValidationSummary" runat="server" ForeColor="Red"/>
<fieldset>
   <legend>Edit Flight Schedule</legend>
  <table style="width:100%">
     <tr>
        <td style="width:20%">
            <asp:Label ID="lblAircraft" runat="server" Text="Aircraft"></asp:Label>
        &nbsp;:</td>
        <td colspan = 3>
            <asp:DropDownList ID="ddlAircraft" runat="server" Width="204px">
            </asp:DropDownList>
        </td>
     </tr>
     <tr>
       <td style="width:20%">
           <asp:Label ID="lblFlightNumber" runat="server" Text="Flight Number"></asp:Label> 
         &nbsp;:</td>
       <td>
           <asp:TextBox ID="txtFlightNumber" runat="server" MaxLength="10" Enabled="False"></asp:TextBox>
       </td>
       <td>
           <asp:Label ID="lblStatus" runat="server" Text="Status"></asp:Label>
       &nbsp;:</td>
       <td>
           <asp:TextBox ID="txtStatus" runat="server" MaxLength="10"></asp:TextBox>
       </td>
     </tr>
     <tr>
       <td style="width:20%">
           <asp:Label ID="lblDepartAirport" runat="server" Text="Departure Airport"></asp:Label> 
       &nbsp;:</td>
       <td>
           <asp:DropDownList ID="ddlDepartAirport" runat="server" 
               onselectedindexchanged="ddlDepartAirport_SelectedIndexChanged" 
               AutoPostBack="True" Width="204px">
           </asp:DropDownList>
       </td>
        <td>
           <asp:Label ID="lblArrivalAirport" runat="server" Text="Arrival Airport"></asp:Label> 
       &nbsp;:</td>
       <td>
           <asp:DropDownList ID="ddlArrivalAirport" runat="server" AutoPostBack="True" 
               onselectedindexchanged="ddlArrivalAirport_SelectedIndexChanged" Width="204px">
           </asp:DropDownList>
       </td>
     </tr>
     <tr>
       <td style="width:20%">
           <asp:Label ID="lblDepartTerminal" runat="server" Text="Departure Terminal"></asp:Label> 
       &nbsp;:</td>
       <td>
           <asp:DropDownList ID="ddlDepartTerminal" runat="server"  Width="204px">
           </asp:DropDownList>
       </td>
        <td>
           <asp:Label ID="lblArrivalTerminal" runat="server" Text="Arrival Terminal"></asp:Label> 
       &nbsp;:</td>
       <td>
           <asp:DropDownList ID="ddlArrivalTerminal" runat="server" Width="204px">
           </asp:DropDownList>
       </td>
     </tr>
     <tr>
       <td style="width:20%">
           <asp:Label ID="lblDepartDate" runat="server" Text="Departure Date"></asp:Label> 
       &nbsp;: *</td>
       <td>
           <asp:TextBox ID="txtDepartDate" runat="server"></asp:TextBox>
           <asp:RequiredFieldValidator ID="rfvDepartDate" runat="server" 
               ControlToValidate="txtDepartDate" ErrorMessage="Departure Date is required" 
               ForeColor="Red">*</asp:RequiredFieldValidator> 
       </td>
        <td>
           <asp:Label ID="lblArrivalDate" runat="server" Text="Arrival Date"></asp:Label> 
       &nbsp;: *</td>
       <td>
           <asp:TextBox ID="txtArrivalDate" runat="server"></asp:TextBox>
           <asp:RequiredFieldValidator ID="rfvArrivalDate" runat="server" 
               ControlToValidate="txtArrivalDate" ErrorMessage="Arrival Date is required" 
               ForeColor="Red">*</asp:RequiredFieldValidator>
       </td>
     </tr>
     <tr>
        <td style="width:20%">   
        </td>
        <td>
             <tp:TimePicker id="tpDepartTime" runat="server" ></tp:TimePicker>
        </td>
        <td>
        </td>
        <td>
            <tp:TimePicker id="tpArrivalDate" runat="server" ></tp:TimePicker>
        </td>
     </tr>
     <tr>
       <td>
           <asp:Label ID="lblDistance" runat="server" Text="Distance"></asp:Label>
       &nbsp;:</td>
       <td>
           <asp:TextBox ID="txtDistance" runat="server" MaxLength="10"></asp:TextBox>
       </td>
       <td>
           <asp:Label ID="lblTaxSurcharge" runat="server" Text="Tax Surcharge"></asp:Label>
       &nbsp;:</td>
       <td>
           <asp:TextBox ID="txtTaxSurcharge" runat="server" MaxLength="21"></asp:TextBox>
           <asp:RangeValidator ID="ravTaxSurcharge" runat="server" 
               ControlToValidate="txtTaxSurcharge" 
               ErrorMessage="Tax Surcharge should enter numeric value only" ForeColor="Red" 
               MaximumValue="999999999999999999.99" MinimumValue="0" Type="Double">*</asp:RangeValidator>
       </td>
     </tr>
  </table>
</fieldset>
<div>
    <asp:Button ID="btnSave" runat="server" Text="    Save    " onclick="btnSave_Click" CssClass="yellow_button" />&nbsp;&nbsp;
    <asp:Button ID="btnCancel" runat="server" Text="   Cancel   " 
        CausesValidation="False" onclick="btnCancel_Click" CssClass="yellow_button" />
    <br />
</div>


</asp:Content>
